package org.apache.james.model;

import org.apache.james.user.api.model.User;

/**
 * 用户
 * @author ccoke
 */
public class CustomUser implements User {
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;

    public CustomUser() {
    }

    public CustomUser(String username, String password) {
        this.username = username;
        this.password = password;
    }

    /**
     * 获取用户名
     */
    @Override
    public String getUserName() {
        return this.username;
    }

    /**
     * 验证密码
     */
    @Override
    public boolean verifyPassword(String pass) {
        return this.password.equals(pass);
    }

    @Override
    public boolean setPassword(String password) {
        this.password = password;
        return true;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }


}
